//
//  ChatBaseCell.h
//  学生汇
//
//  Created by yull on 14/11/12.
//  Copyright (c) 2014年 于博. All rights reserved.
//

#define CHAT_CELL_DELTA 2
#define CHAT_CELL_LEFT_SPACE 10
#import <UIKit/UIKit.h>
#import "ChatBaseMsg.h"

@protocol ChatBaseCellDelegate <NSObject>

- (void)onHeadClickWithMessage:(ChatBaseMsg *)message;

- (void)onContentSingleTap;

@optional

- (void)chatCellOnLongPress;

- (void)onResend:(ChatBaseMsg *)message;

@end

@interface ChatBaseCell : UITableViewCell <UIActionSheetDelegate>

@property (nonatomic, strong) ChatBaseMsg *chatMsg;

@property (nonatomic, strong) UIImageView *headImageView;

@property (nonatomic, strong) UIImageView *contentImageView;

@property (nonatomic, strong) UIView *chatContentView;

@property (nonatomic, strong) UIImageView *failImageView;

@property (nonatomic, strong) UIActivityIndicatorView *sendingIndicatorView;

@property (nonatomic, strong) UILabel *timeLabel;

@property (nonatomic, assign) CGFloat xSpace;

@property (nonatomic, assign) CGFloat ySpace;

@property (nonatomic, assign) id <ChatBaseCellDelegate> delegate;

- (void)drawCellWithChatMsg:(ChatBaseMsg *)chatMsg;

- (void)onTapGesture:(UITapGestureRecognizer *)tapGesture;

- (void)addMessageObserver;

- (void)removeMessageObserver;

@end
